package top.yxqz.springmvc.view.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: 余小小
 * @date: 2023/4/27
 * @description：默认的转发视图
 */
@Controller
@RequestMapping("/view")
public class InternalController {
    /**
     * uri /view/forward
     *
     * @return
     */
    @GetMapping("/forward")
    public String methodName() {
        return "forward:/msg/app/";
    }

    /**
     * 重定向
     * uri /view/redirect
     * @return
     */
    @GetMapping("/redirect")
    public String methodName2() {
        System.out.println("xxxxxx");
        return "redirect:/msg/app/";
    }
}

